package com.spring.shops.service;

import com.spring.shops.model.dto.SysMenuDTO;
import com.spring.shops.model.dto.SysUserDTO;
import com.spring.shops.model.result.MenuAndPermsData;
import com.spring.shops.model.result.ServerResponseEntityVoid;
import com.spring.shops.model.vo.SysMenuVO;
import com.spring.shops.model.vo.SysMenuVO2;

import java.util.List;

public interface MenuService {
    /**
     * 获取所有的权限列表
     * @return
     */
    ServerResponseEntityVoid<List<SysMenuVO>> table();
    /**
     * 通过登陆用户的userId获取用户所拥有的菜单和权限
     */
    ServerResponseEntityVoid<List<SysMenuVO>> list();
    /**
     * 新增菜单数据
     * @param dto
     * @return
     */
    ServerResponseEntityVoid save(SysMenuDTO dto);
    /**
     * 根据菜单id获取信息
     * @param menuId
     * @return
     */
    ServerResponseEntityVoid<SysMenuVO> getInfoById(Long menuId);
    /**
     * 更新菜单信息
     * @param dto
     * @return
     */
    ServerResponseEntityVoid update(SysMenuDTO dto);
    /**
     * 根据id删除数据
     * @param menuId
     * @return
     */
    ServerResponseEntityVoid deleteById(Long menuId);
    /**
     * 获取用户所拥有的菜单和权限
     */
    ServerResponseEntityVoid<MenuAndPermsData> getMenuAndPerms();
}
